﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>四川省辽宁商会</title>

		<link rel="shortcut icon" href="image/favicon.ico" type="image/x-icon" />
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<link rel="stylesheet" href=" css/index.css">
		<link rel="stylesheet" href=" css/zwh.css">
		<link rel="stylesheet" href=" css/top.css">
		<link rel="stylesheet" href=" css/mjgk.css">
		<link rel="stylesheet"
			href=" framework/bootstrap-3.0.0/css/bootstrap.css">
		<link rel="stylesheet"
			href=" framework/bootstrap-3.0.0/css/bootstrap.min.css">

		<link rel="stylesheet" type="text/css"
			href="common/front/style/style.css" />
		<script src="common/front/js/jquery-1.11.3.min.js"></script>
		<script src="common/front/js/bootstrap.min.js"></script>
		<link rel="stylesheet"
			href=" framework/bootstrap-3.0.0/css/bootstrap-theme.css">
		<link href=" framework/bootstrap-3.0.0/css/bootstrap-combined.min.css"
			rel="stylesheet">
		<script type="text/javascript" src=" js/jquery.js"></script>
		<meta http-equiv=“X-UA-Compatible” content=“IE=7″>
		<meta http-equiv=“X-UA-Compatible” content=“IE=8″>
		<!–[if lt IE 7]>
		<script
			src=”http://ie7-js.googlecode.com/svn/version/2.0(beta)/IE7.js”
			type=”text/javascript”></script>
		<![endif]–>

		<!–[if lt IE 8]>
		<script
			src=”http://ie7-js.googlecode.com/svn/version/2.0(beta)/IE8.js”
			type=”text/javascript”></script>
		<![endif]–>

		<!–[if lt IE 9]>
		<script
			src=”http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js”></script>
		<![endif]–>
		<style type="text/css">
a {
	text-decoration: none;
	color: black !important;
	font-size: 14px;
}

a:hover {
	text-decoration: none;
	color: #008fd7 !important;
}
#page_navigation a {
	padding: 3px;
	margin: 2px;
	color: black;
	text-decoration: none
}

.active_page {
    color: #008fd7 !important;
}
</style>
		<script type="text/javascript">
	function diaoyan() {	
		document.getElementById("testDiv").style.display = "block";
		document.getElementById("testDiv2").style.display = "none";
		document.getElementById("diaoyan").style.color = "#008fd7";
		document.getElementById("qiye").style.color = "black";
		document.getElementById("diaoyan").style.background = "#eee";
		document.getElementById("qiye").style.background = "white";
	}

	function qiye() {
		document.getElementById("testDiv2").style.display = "block";
		document.getElementById("testDiv").style.display = "none";
		document.getElementById("qiye").style.color = "#008fd7";
		document.getElementById("diaoyan").style.color = "black";
		document.getElementById("qiye").style.background = "#eee";
		document.getElementById("diaoyan").style.background = "white";
	}
	
	
	$(document).ready(function(){
			var show_per_page = 7; 
			var number_of_items = $('#content').children().size();
			var number_of_pages = Math.ceil(number_of_items/show_per_page);
			$('#current_page').val(0);
			$('#show_per_page').val(show_per_page);
			var navigation_html = '<center><a class="previous_link" href="javascript:previous();">上一页</a>';
			var current_link = 0;
			while(number_of_pages > current_link){
				navigation_html += '<a class="page_link" href="javascript:go_to_page(' + current_link +')" longdesc="' + current_link +'">'+ (current_link + 1) +'</a>';
				current_link++;
			}
			navigation_html += '<a class="next_link" href="javascript:next();">下一页</a></center>';
			$('#page_navigation').html(navigation_html);
			$('#page_navigation .page_link:first').addClass('active_page');
			$('#content').children().css('display', 'none');
			$('#content').children().slice(0, show_per_page).css('display', 'block');
			
			var number_of_items = $('#content2').children().size();
			var number_of_pages = Math.ceil(number_of_items/show_per_page);
			$('#current_page2').val(0);
			$('#show_per_page2').val(show_per_page);
			var navigation_html = '<center><a class="previous_link2" href="javascript:previous2();">上一页</a>';
			var current_link = 0;
			while(number_of_pages > current_link){
				navigation_html += '<a class="page_link2" href="javascript:go_to_page2(' + current_link +')" longdesc="' + current_link +'">'+ (current_link + 1) +'</a>';
				current_link++;
			}
			navigation_html += '<a class="next_link2" href="javascript:next2();">下一页</a></center>';
			$('#page_navigation2').html(navigation_html);
			$('#page_navigation2 .page_link2:first').addClass('active_page2');
			$('#content2').children().css('display', 'none');
			$('#content2').children().slice(0, show_per_page).css('display', 'block');	
			
			var number_of_items = $('#content3').children().size();
			var number_of_pages = Math.ceil(number_of_items/show_per_page);
			$('#current_page3').val(0);
			$('#show_per_page3').val(show_per_page);
			var navigation_html = '<center><a class="previous_link3" href="javascript:previous3();">上一页</a>';
			var current_link = 0;
			while(number_of_pages > current_link){
				navigation_html += '<a class="page_link3" href="javascript:go_to_page3(' + current_link +')" longdesc="' + current_link +'">'+ (current_link + 1) +'</a>';
				current_link++;
			}
			navigation_html += '<a class="next_link3" href="javascript:next3();">下一页</a></center>';
			$('#page_navigation3').html(navigation_html);
			$('#page_navigation3 .page_link3:first').addClass('active_page3');
			$('#content3').children().css('display', 'none');
			$('#content3').children().slice(0, show_per_page).css('display', 'block');	
				
		});
		function previous(){
			new_page = parseInt($('#current_page').val()) - 1;
			if($('.active_page').prev('.page_link').length==true){
				go_to_page(new_page);
			}
		}
		function next(){
			new_page = parseInt($('#current_page').val()) + 1;
			//if there is an item after the current active link run the function
			if($('.active_page').next('.page_link').length==true){
				go_to_page(new_page);
			}
		}
		function go_to_page(page_num){
			var show_per_page = parseInt($('#show_per_page').val());
			start_from = page_num * show_per_page;
			end_on = start_from + show_per_page;
			$('#content').children().css('display', 'none').slice(start_from, end_on).css('display', 'block');
			$('.page_link[longdesc=' + page_num +']').addClass('active_page').siblings('.active_page').removeClass('active_page');
			$('#current_page').val(page_num);
		}
		function previous2(){
			new_page = parseInt($('#current_page2').val()) - 1;
			if($('.active_page2').prev('.page_link2').length==true){
				go_to_page2(new_page);
			}
		}
		function next2(){
			new_page = parseInt($('#current_page2').val()) + 1;
			//if there is an item after the current active link run the function
			if($('.active_page2').next('.page_link2').length==true){
				go_to_page2(new_page);
			}
		}
		function go_to_page2(page_num){
			var show_per_page = parseInt($('#show_per_page2').val());
			start_from = page_num * show_per_page;
			end_on = start_from + show_per_page;
			$('#content2').children().css('display', 'none').slice(start_from, end_on).css('display', 'block');
			$('.page_link2[longdesc=' + page_num +']').addClass('active_page2').siblings('.active_page2').removeClass('active_page2');
			$('#current_page2').val(page_num);
		}
	
		function previous3(){
			new_page = parseInt($('#current_page3').val()) - 1;
			if($('.active_page3').prev('.page_link3').length==true){
				go_to_page3(new_page);
			}
		}
		function next3(){
			new_page = parseInt($('#current_page3').val()) + 1;
			//if there is an item after the current active link run the function
			if($('.active_page3').next('.page_link3').length==true){
				go_to_page3(new_page);
			}
		}
		function go_to_page3(page_num){
			var show_per_page = parseInt($('#show_per_page3').val());
			start_from = page_num * show_per_page;
			end_on = start_from + show_per_page;
			$('#content3').children().css('display', 'none').slice(start_from, end_on).css('display', 'block');
			$('.page_link3[longdesc=' + page_num +']').addClass('active_page3').siblings('.active_page3').removeClass('active_page3');
			$('#current_page3').val(page_num);
		}
	
</script>
	</head>

	<body
		style="background-color: #eeeeee; font-family: Microsoft YaHei; overflow-y: scroll">
		<a name="top" id="top"></a>
		<a name="top" id="top2"></a>
		<a name="top" id="top3"></a>
		<div style="top: 0px;"><jsp:include page="top.jsp"></jsp:include></div>
		<div class="show5">
			<div style="margin-left: 1.5%; margin-top: 1.5%;">
				<a href="front/index"> 网站首页</a> >
				<a href="front/zhuanwei">关于商会</a>
				<br>
				<br>
			</div>

			<div class="left" style="width: 25%;">
				<div class="mid"
					style="width: 100%; margin-bottom: 10px; margin-left: 0;height: 310px;">
					<div style="">
						<table width="100%">
							<tr>
								<th class="th cursor-pointer active"
									style="background-color: white">
									<div class="titles"
										style="color: #008fd7; border-bottom: 2px solid #008fd7; height: 45px;">
										<p style="font-weight: 600;font-size:20px;margin: 0">
											&nbsp;&nbsp;&nbsp;关于商会
											<br />
										</p>
									</div>

								</th>
							</tr>
							<tr>
								<td id="diaoyan" style="background-color: #eee;height: 45px;color:#008fd7" onclick="diaoyan()" class="th cursor-pointer">
									<div >

										&nbsp;&nbsp;&nbsp;
										商会简介
										<br />


									</div>
								</td>
							</tr>
							<tr>
								<td  id="qiye" style="background-color: white;height: 45px;" onclick="qiye()" class="th cursor-pointer">
									<div>
										&nbsp;&nbsp;&nbsp;
										组织架构
										<br />
									</div>
								</td>
							</tr>
							
						</table>
					</div>

				</div>
				
			</div>
			<div class="right"
				style="width: 73%; height: 310px; border: 1px solid #eee;">

				<div id="testDiv" style="display: block;">
					<a name="top" id="top"></a>
					<table width="100%">
						<tr>
							<td>
								<div class="title" style="color: #008fd7;">
									商会简介
								</div>
								
							</td>
						</tr>
					</table>
					<br>
				
					<div style="margin: 1%;">
						<c:forEach items="${diaoyan}" var="yz">
							${yz.content}
						</c:forEach>
					</div>
					

				</div>
				<div id="testDiv2" style="display: none;">
					<a name="top" id="top2"></a>
					<table width="100%">
						<tr>
							<td>
								<div class="title" style="color: #008fd7;">
									组织架构
								</div>
								
							</td>
						</tr>
					</table>
					<br>
					
					<div style="margin: 1%;">
						<c:forEach items="${qiye}" var="yz">
							${yz.content}
						</c:forEach>
					</div>
					
				</div>
			</div>
		</div>
		<div class="footer"><jsp:include page="bottom.jsp" flush="true"></jsp:include></div>
	</body>
	<script>
	var containers = $(".cons");
	var lens = containers.find(".imgs").length;
	var timeoutTickets;
	function loops() {
		if (timeoutTickets) {
			clearTimeout(timeoutTickets);
		}
		timeoutTickets = setTimeout(function() {
			containers.find(".imgs").eq(0).animate( {
				marginLeft : -500
			}, function() {
				containers.find(".imgs").eq(0).appendTo(containers).css( {
					marginLeft : 0
				});
				loops();
			});
		}, 2000);
	};
	$(".prevs").on("mouseover", function() {
		clearTimeout(timeoutTickets);
	});
	$(".prevs").on("mouseout", function() {
		loops();
	});
	$(".prevs").on("click", function() {
		containers.find(".imgs").eq(lens - 1).remove().css( {
			marginLeft : -500
		}).prependTo(containers).animate( {
			marginLeft : 0
		}, loop);
	});
	$(".nexts").on("mouseover", function() {
		clearTimeout(timeoutTickets);
	});
	$(".nexts").on("mouseout", function() {
		loops();
	});
	$(".nexts").on("click", function() {
		containers.find(".imgs").eq(0).animate( {
			marginLeft : -500
		}, function() {
			$(this).remove().css( {
				marginLeft : 0
			}).appendTo(containers);
			loops();
		});
	});
	loops();
</script>
</html>
